<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="${staticServer}/inc/style/main.css" />
<link rel="stylesheet" href="${staticServer}/inc/style/page.css" />
<link rel="stylesheet" href="${staticServer}/css/struct_info.css" />
<script src="${staticServer}/inc/js/jquery.js"></script>
<script src="${staticServer}/inc/js/pageset.js"></script>
<script src="${staticServer}/inc/js/submitter.js"></script>
<script src="${staticServer}/inc/js/infopad.js?2.2"></script>
<script type="text/javascript" src="${staticServer}/common/uploadify/jquery.uploadify.js"></script>
<script type="text/javascript" src="${staticServer}/js/web/uploadImg.js?1.5"></script>

<link rel="stylesheet" href="${staticServer}/css/consultant_client.css" />
	
<link rel="stylesheet" href="${staticServer}/inc/style/date/datepicker.css" />
<script src="${staticServer}/inc/js/datepicker.js"></script>

<style>
#SWFUpload_0{
	margin-top: 70px;
    margin-left: -30px;
}
</style>
<script>
var contextPath='${contextPath}';
var _contextPath = '${staticServer}';

var add_Period = function(){
	var id = $("#id").val();
	var office_id = $("#office_id").val();
	var fixpaymenttime = $("#fixpaymenttime").val();
	var ownersituation = $("#ownersituation").val();
	var contactperson = $("#contactperson").val();
	var hturl = $("#all_words4").val();
	var agencybail=$("#agencybail").val();
	var depositmoney = $("#depositmoney").val();
	if(office_id==""){
		infopad.err("请输入中心");
		return;
	}
	
	$.post("${contextPath}/rent/addhouseinformation.json", {
		    "id":id,
		    "hturl":hturl,
		    "office_id":office_id,
			"fixpaymenttime":fixpaymenttime,
			"ownersituation":ownersituation,
			"contactperson":contactperson,
			"agencybail":agencybail,
			"depositmoney":depositmoney
		}, function(ms) {
		   var msg = ms.msg;
		   if(msg!=null && msg=="1"){
			   infopad.msg("操作成功！");
			   window.location.href="${contextPath}/rent/rentInforList.htm";
		   }
			
	});
}


</script>
</head>
<input type="hidden" id="id" value="<#if rent??>${rent.rent_infor_id}</#if>">
<body>
	<div id="home_link">
		<ul>
			<li></li>
			<li>&gt;</li>
			<li>组织架构</li>
			<li>&gt;</li>
			<li class="current">title</li>
		</ul>
	</div>

	<div id="container">
		<div id="title">添加房租信息</div>
		<table id="infotable">
			
			<tr>
				<th>选择中心</th>
				<td>
					<select id="office_id" >
	            		<#if office_List??>
	              			<#list office_List as ls>
	              				<option value="${ls.id}">${ls.name}</option>
	              			</#list>
	            		</#if>
	            	</select>	
				</td>
			</tr>
			<tr>
				<th>固定的支付时间:</th>
				<td>
					<input type="text" id="fixpaymenttime"  value="<#if rent??>${rent.fixpaymenttime}</#if>" size="14" maxlength="15" >

				</td>
			</tr>
			<tr>
				<th>业主的情况：</th>
				<td>
					<input type="text" id="ownersituation"  value="<#if rent??>${rent.ownersituation}</#if>" size="14" maxlength="15" >
				</td>
			</tr>
			<tr>
				<th>联系人及联系方式：</th>
				<td>
					<input type="text" id="contactperson"  value="<#if rent??>${rent.contactperson}</#if>" size="14" maxlength="15" >
				</td>
			</tr>
			
				<tr>
				<th>中介保险金：</th>
				<td>
					<input type="text" id="agencybail"  value="<#if rent??>${rent.agencybail}</#if>" size="14" maxlength="15" >
				</td>
			</tr>
			
				
			
				<tr>
				<th>押金的情况：</th>
				<td>
					<input type="text" id="depositsituation" value="<#if rent??>${rent.depositsituation}</#if>" size="14" maxlength="15" >
				</td>
			</tr>
				<tr>
				<th>押金的金额：</th>
				<td>
					<input type="text" id="depositmoney" value="<#if rent??>${rent.depositmoney}</#if>" size="14" maxlength="15" >
				</td>
			</tr>
			<tr>
				<th>上传合同等其他文件</th>
				<td>
						
					<a class="file_box" style="list-style-type: none;float: left;display: block; width:180px; height:180px; overflow: hidden; border: 1px solid #EBEBEB; background: none repeat scroll 0 0 #F3F3F3; color: #999999; cursor: pointer; text-align: center; margin-left:10px; ">
                    <em style="background:url(${staticServer}/img/add_newpic.png) 0 0; display: inline-block; width:180px; height:180px; overflow: hidden;line-height: 20em; vertical-align: middle;">
                    <input type="file" id="upload4" style="display: block;width:180px; height:180px;opacity: 0; filter:alpha(opacity=0); "></em>
                    </a>
                    <label class="zt_widthlabel" style=" font-size:9px; float:left; visibility:hidden;">文件：</label>
                    <input type="text" id="all_words4" value="<#if rent??>${rent.hturl}</#if>" style=" width:100px; height:10px; float:left;visibility:hidden;" class="input w180" value="">
					</ul>
				</td>
			</tr>
			
		</table>
		
		<div id="controlbar">
			<input type="button" class="submit" onclick="add_Period()" value="  保  存  " />
		</div>
	</div>
	
</body>
</html>